<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view locale="#{SessionBeanBaseEm.localeSetting}">
        <f:loadBundle basename="UtilidadesSetup" var="utilidadesSetup"/>
        <div align="center">
            <ui:themeLinks binding="#{PortletPanelDescarga.themeLinks1}" id="themeLinks1"/>
            <ui:form binding="#{PortletPanelDescarga.form1}" id="form1">
                <h:panelGrid binding="#{PortletPanelDescarga.gridPanelContainer}" id="gridPanelContainer" style="text-align: center" width="100%">
                    <h:panelGrid binding="#{PortletPanelDescarga.topGridPanel}" columnClasses="top" columns="1" headerClass="headerClassDataTable"
                        id="topGridPanel" rowClasses="rowClassBlue, rowClassWhite" width="100%">
                        <f:facet name="header">
                            <h:outputText value="OPCIONES DE BUSQUEDA"/>
                        </f:facet>
                        <h:panelGroup>
                            <h:panelGrid columnClasses="top" columns="3">
                                <h:outputText binding="#{PortletPanelDescarga.outputTextCliente}" id="outputTextCliente" styleClass="outputText" value="CLIENTE"/>
                                <h:outputText style="color: #F4FBFF" styleClass="outputText" value=" _____ "/>
                                <ui:dropDown binding="#{PortletPanelDescarga.dropDownClientes}" id="dropDownClientes"
                                    items="#{SessionBeanBaseEm.clientesOptions}" styleClass="select"/>                         
                                <h:outputText binding="#{PortletPanelDescarga.outputTextProv}" id="outputTextProv"
                                    rendered="#{SessionBeanBaseEm.renderedDropDownEm}" styleClass="outputText" value="EMPRESA MENSAJERIA"/>
                                    <h:outputText style="color: #F4FBFF" styleClass="outputText" value=" _____ "/>
                                <ui:dropDown binding="#{PortletPanelDescarga.dropDownEm}" id="dropDownEm" items="#{SessionBeanBaseEm.proveedorOptions}"
                                    rendered="#{SessionBeanBaseEm.renderedDropDownEm}" styleClass="select" submitForm="true" valueChangeListener="#{PortletPanelDescarga.dropDownEm_processValueChange}"/>
                                  
                                <h:outputText binding="#{PortletPanelDescarga.outputTextNodo}" id="outputTextNodo" styleClass="outputText" value="NODO"/>
                                <h:outputText style="color: #F4FBFF" styleClass="outputText" value=" _____ "/>
                                <ui:dropDown binding="#{PortletPanelDescarga.dropDownNodos}" id="dropDownNodos" items="#{SessionBeanBaseEm.nodosOptions}" styleClass="select"/>
                            
                                    <h:outputText binding="#{PortletPanelDescarga.outputTextNumeroOrden}" id="outputTextNumeroOrden" value="NUMERO ORDEN" styleClass="outputText"/>
                                    <h:outputText style="color: #F4FBFF" styleClass="outputText" value=" _____ "/>
                                    <h:inputText binding="#{PortletPanelDescarga.textFieldNumeroOrden}" id="textFieldNumeroOrden" styleClass="select"/>
                             </h:panelGrid>
                        </h:panelGroup>
                        <h:panelGroup>
                            <h:panelGrid columnClasses="top" columns="2">
                                <h:panelGroup>
                                    <h:panelGrid columns="4">
                                        <h:outputText binding="#{PortletPanelDescarga.fechaIni}" id="fechaIni" styleClass="outputText" value="FECHA INICIAL"/>
                                        <ui:calendar binding="#{PortletPanelDescarga.calendarInicial}" id="calendarInicial"
                                            maxDate="#{SessionBeanBaseEm.maxDate}" minDate="#{SessionBeanBaseEm.minDate}" selectedDate="#{SessionBeanBaseEm.defaultInitDate}"/>
                                        <h:outputText style="color: white" styleClass="outputText" value=" _____ "/>
                                        <h:message for="calendarInicial" id="cfechaInicialMessage" styleClass="portlet-msg-alert"/>
                                    </h:panelGrid>
                                </h:panelGroup>
                                <h:panelGroup>
                                    <h:panelGrid columns="4">
                                        <h:outputText binding="#{PortletPanelDescarga.fechaFin}" id="fechaFin" styleClass="outputText" value="FECHA FINAL"/>
                                        <ui:calendar binding="#{PortletPanelDescarga.calendarFinal}" id="calendarFinal" maxDate="#{SessionBeanBaseEm.maxDate}"
                                            minDate="#{SessionBeanBaseEm.minDate}" selectedDate="#{SessionBeanBaseEm.maxDate}"/>
                                        <h:outputText style="color: white" styleClass="outputText" value=" _____ "/>
                                        <h:message for="calendarFinal" id="cfechaFinalMessage" styleClass="portlet-msg-alert"/>
                                    </h:panelGrid>
                                </h:panelGroup>
                            </h:panelGrid>
                        </h:panelGroup>
                        <f:facet name="footer">
                            <h:panelGroup style="display: block; text-align: center">
                                <h:commandButton action="#{PortletPanelDescarga.buttonConsultar_action}" binding="#{PortletPanelDescarga.buttonConsultar}"
                                    id="buttonConsultar" styleClass="button" value="CONSULTAR"/>
                                <h:outputText style="color: white" styleClass="outputText" value=" _____ "/>
                                <h:commandButton action="#{PortletPanelDescarga.buttonLimpiar_action}" binding="#{PortletPanelDescarga.buttonLimpiar}"
                                    id="buttonLimpiar" styleClass="button" value="LIMPIAR"/>
                            </h:panelGroup>
                        </f:facet>
                    </h:panelGrid>
                    <h:panelGrid binding="#{PortletPanelDescarga.gridPanelGenerarBase}" columnClasses="top" columns="1" headerClass="headerClassDataTable"
                        id="gridPanelGenerarBase" rendered="#{SessionBeanBaseEm.roleGeneracion}" width="100%">
                        <f:facet name="header">
                            <h:panelGrid columnClasses="top" columns="2" width="100%">
                                <h:panelGroup style="display: block; text-align: left">
                                    <h:outputText styleClass="headerClassDataTable" value="GENERACION BASES"/>
                                </h:panelGroup>
                                <h:panelGroup style="display: block; text-align: rigth">
                                    <h:commandButton action="#{PortletPanelDescarga.buttonVer_action}" binding="#{PortletPanelDescarga.buttonVer}"
                                        id="buttonVer" styleClass="button" value="Max."/>
                                </h:panelGroup>
                            </h:panelGrid>
                        </f:facet>
                        <ui:textArea binding="#{PortletPanelDescarga.textAreaOrdenes}" columns="30" id="textAreaOrdenes"
                            rendered="#{SessionBeanBaseEm.renderedPanelGridGeneracion}" rows="20" styleClass="textField"/>
                        <h:panelGroup style="display: block; text-align: left">
                            <h:commandButton action="#{PortletPanelDescarga.buttonGenerar_action}" binding="#{PortletPanelDescarga.buttonGenerar}"
                                id="buttonGenerar" rendered="#{SessionBeanBaseEm.renderedPanelGridGeneracion}" styleClass="button" value="GENERAR BASE"/>
                            <h:outputText rendered="#{SessionBeanBaseEm.renderedPanelGridGeneracion}" style="color: white" styleClass="outputText" value=" _____ "/>
                            <h:commandButton action="#{PortletPanelDescarga.buttonLimpiarTextArea_action}"
                                binding="#{PortletPanelDescarga.buttonLimpiarTextArea}" id="buttonLimpiarTextArea"
                                rendered="#{SessionBeanBaseEm.renderedPanelGridGeneracion}" styleClass="button" value="LIMPIAR"/>
                        </h:panelGroup>
                    </h:panelGrid>
                    <h:panelGrid binding="#{PortletPanelDescarga.bottomGridPanel}" columnClasses="top" headerClass="headerClassDataTable" id="bottomGridPanel" width="100%">
                        <h:panelGroup style="display: block; text-align: center">
                            <ui:alert binding="#{PortletPanelDescarga.alertMessage}" id="alertMessage" rendered="#{SessionBeanBaseEm.renderedAlert}"/>
                        </h:panelGroup>
                        <h:dataTable binding="#{PortletPanelDescarga.dataTableBases}" headerClass="headerClassDataTable" id="dataTableBases"
                            rendered="#{SessionBeanBaseEm.renderedTable}" rowClasses="rowClassBlue, rowClassWhite" rows="30"
                            value="#{SessionBeanBaseEm.baseEmList}" var="currentRow" width="100%">
                            <h:column binding="#{PortletPanelDescarga.nodo}" id="nodo">
                                <h:outputText binding="#{PortletPanelDescarga.outputText1}" id="outputText1" styleClass="outputTextDataTable" value="#{currentRow.nombreNodo}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{PortletPanelDescarga.outputText2}" id="outputText2" value="Nodo"/>
                                </f:facet>
                                <h:inputHidden binding="#{PortletPanelDescarga.hiddenCodigo}" id="hiddenCodigo" value="#{currentRow.codigoBase}"/>
                            </h:column>
                            <h:column binding="#{PortletPanelDescarga.clienteProducto}" id="clienteProducto">
                                <h:outputText binding="#{PortletPanelDescarga.outputText3}" id="outputText3" styleClass="outputTextDataTable" value="#{currentRow.razonSocialCliente} - #{currentRow.descProducto}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{PortletPanelDescarga.outputText4}" id="outputText4" value="Cliente-Producto"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{PortletPanelDescarga.numOrden}" id="numOrden">
                                <h:outputText binding="#{PortletPanelDescarga.outputText5}" id="outputText5" styleClass="outputTextDataTable" value="#{currentRow.numeroOrden}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{PortletPanelDescarga.outputText6}" id="outputText6" value="# Orden"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{PortletPanelDescarga.ciclo}" id="ciclo">
                                <f:facet name="header">
                                    <h:outputText binding="#{PortletPanelDescarga.outputText7}" id="outputText7" value="Ciclo"/>
                                </f:facet>
                                <h:outputText binding="#{PortletPanelDescarga.outputText13}" id="outputText13" styleClass="outputTextDataTable" value="#{currentRow.ciclo}"/>
                            </h:column>
                            <h:column binding="#{PortletPanelDescarga.fechaPublicacion}" id="fechaPublicacion">
                                <f:facet name="header">
                                    <h:outputText binding="#{PortletPanelDescarga.outputText8}" id="outputText8" value="Fecha Publicación"/>
                                </f:facet>
                                <h:outputText binding="#{PortletPanelDescarga.outputText14}" id="outputText14" styleClass="outputTextDataTable" value="#{currentRow.fechaPublicacion}"/>
                            </h:column>
                            <h:column binding="#{PortletPanelDescarga.cant}" id="cant">
                                <f:facet name="header">
                                    <h:outputText binding="#{PortletPanelDescarga.outputText9}" id="outputText9" value="Cant"/>
                                </f:facet>
                                <h:panelGroup style="display: block; text-align: center">
                                    <h:outputText binding="#{PortletPanelDescarga.outputText15}" id="outputText15" styleClass="outputTextDataTable" value="#{currentRow.cantReg}"/>
                                </h:panelGroup>
                            </h:column>
                            <h:column binding="#{PortletPanelDescarga.fechaDescarga}" id="fechaDescarga">
                                <f:facet name="header">
                                    <h:outputText binding="#{PortletPanelDescarga.outputText10}" id="outputText10" value="Fecha Descarga"/>
                                </f:facet>
                                <h:panelGroup>
                                    <h:outputText binding="#{PortletPanelDescarga.outputText16}" id="outputText16"
                                        rendered="#{SessionBeanBaseEm.roleEmpreseaMensajeria}" styleClass="outputTextDataTable" value="#{currentRow.fechaDescarga}"/>
                                    <h:commandLink action="#{PortletPanelDescarga.linkActionDescarga_action}"
                                        binding="#{PortletPanelDescarga.linkActionDescarga}" id="linkActionDescarga" rendered="#{SessionBeanBaseEm.roleComputec  || SessionBeanBaseEm.roleAdministrador}">
                                        <h:outputText binding="#{PortletPanelDescarga.linkAction1Text}" id="linkAction1Text" styleClass="outputTextCommandLink" value="#{currentRow.fechaDescarga}"/>
                                    </h:commandLink>
                                </h:panelGroup>
                            </h:column>
                            <h:column binding="#{PortletPanelDescarga.descripcion}" id="descripcion">
                                <f:facet name="header">
                                    <h:outputText binding="#{PortletPanelDescarga.outputText11}" id="outputText11" value="Descricpción"/>
                                </f:facet>
                                <h:outputText binding="#{PortletPanelDescarga.outputText17}" id="outputText17" styleClass="outputTextDataTable" value="#{currentRow.descripcion}"/>
                            </h:column>
                            <h:column binding="#{PortletPanelDescarga.fuenteArchivo}" id="fuenteArchivo">
                                <f:facet name="header">
                                    <h:outputText binding="#{PortletPanelDescarga.outputText12}" id="outputText12" value="Fuente"/>
                                </f:facet>
                                <h:panelGrid columns="1" style="text-align: center" width="100%">
                                    <h:commandButton action="#{PortletPanelDescarga.linkActionFileDownload_action}"
                                        binding="#{PortletPanelDescarga.buttonDownload}" id="buttonDownload" image="/././UtilidadesWebApp/imgs/saveDownload.gif" styleClass="guiaDistribucionImage"/>
                                    <h:inputHidden binding="#{PortletPanelDescarga.hiddenPath}" id="hiddenPath" value="#{currentRow.pathBase}"/>
                                </h:panelGrid>
                            </h:column>
                            <f:facet name="footer">
                                <h:panelGroup binding="#{PortletPanelDescarga.groupPanel1}" id="groupPanel1" rendered="#{SessionBeanBaseEm.renderedTable}"
                                    style="display: block; text-align: center" styleClass="list-paging-footer">
                                    <h:commandButton action="#{PortletPanelDescarga.dataTableBases_firstPageAction}"
                                        binding="#{PortletPanelDescarga.dataTableBasesFooterFirstButton}" id="dataTableBasesFooterFirstButton"
                                        image="#{utilidadesSetup.firstPageImg}" immediate="true"/>
                                    <h:commandButton action="#{PortletPanelDescarga.dataTableBases_previousPageAction}"
                                        binding="#{PortletPanelDescarga.dataTableBasesFooterPreviousButton}" id="dataTableBasesFooterPreviousButton"
                                        image="#{utilidadesSetup.previousPageImg}" immediate="true"/>
                                    <h:commandButton action="#{PortletPanelDescarga.dataTableBases_nextPageAction}"
                                        binding="#{PortletPanelDescarga.dataTableBasesFooterNextButton}" id="dataTableBasesFooterNextButton"
                                        image="#{utilidadesSetup.nextPageImg}" immediate="true"/>
                                    <h:commandButton action="#{PortletPanelDescarga.dataTableBases_lastPageAction}"
                                        binding="#{PortletPanelDescarga.dataTableBasesFooterLastButton}" id="dataTableBasesFooterLastButton"
                                        image="#{utilidadesSetup.lastPageImg}" immediate="true"/>
                                </h:panelGroup>
                            </f:facet>
                        </h:dataTable>
                    </h:panelGrid>
                </h:panelGrid>              
            </ui:form>
        </div>
    </f:view>
</jsp:root>
